package org.bet.dao.mongo;

import org.bet.domain.Genome;
import org.springframework.core.convert.converter.Converter;

import com.mongodb.BasicDBObject;
import com.mongodb.DBObject;

public class GenomeWriteConverter implements Converter<Genome, DBObject> {

	@Override
	public DBObject convert(Genome source) {
		DBObject dbo = new BasicDBObject();
		dbo.put("_id", source.getId());
		dbo.put("name", source.getName());
		
		return dbo;
	}

}
